'\" te
.\" Copyright 1989 AT&T Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH MOUNTALL 8 "Dec 17, 2008"
.SH NAME
mountall, umountall \- mount, unmount multiple file systems
.SH SYNOPSIS
.LP
.nf
\fBmountall\fR [\fB-F\fR \fIFSType\fR] [\fB-l\fR | \fB-r\fR] [\fIfile_system_table\fR]
.fi

.LP
.nf
\fBumountall\fR [\fB-k\fR] [\fB-s\fR] [\fB-F\fR \fIFSType\fR] [\fB-l\fR | \fB-r\fR] [\fB-n\fR]  [\fB-Z\fR]
.fi

.LP
.nf
\fBumountall\fR [\fB-k\fR] [\fB-s\fR] [\fB-h\fR \fIhost\fR] [\fB-n\fR] [\fB-Z\fR]
.fi

.SH DESCRIPTION
.sp
.LP
\fBmountall\fR is used to mount file systems specified in a file system table.
The file system table must be in \fBvfstab\fR(5) format. If no
\fIfile_system_table\fR is specified, \fB/etc/vfstab\fR is used. If \(mi is
specified as \fIfile_system_table\fR, \fBmountall\fR reads the file system
table from the standard input. \fBmountall\fR mounts only those file systems
with the \fBmount at boot\fR field set to \fByes\fR in the
\fIfile_system_table\fR.
.sp
.LP
For each file system in the file system table, the following logic is executed:
if there exists a file \fB/usr/lib/fs/\fR\fIFSType\fR\fB/fsckall\fR, where
\fIFSType\fR is the type of the file system, save that file system in a list to
be passed later, and all at once, as arguments to the
\fB/usr/lib/fs/\fR\fIFSType\fR\fB/fsckall\fR script. The
\fB/usr/lib/fs/\fR\fIFSType\fR\fB/fsckall\fR script checks all of the file
systems in its argument list to determine whether they can be safely mounted.
If no \fB/usr/lib/fs/\fR\fIFSType\fR\fB/fsckall\fR script exists for the
\fIFSType\fR of the file system, the file system is individually checked using
\fBfsck\fR(8). If the file system does not appear mountable, it is fixed using
\fBfsck\fR before the mount is attempted. File systems with a \(mi entry in the
\fBfsckdev\fR field are mounted without first being checked.
.sp
.LP
\fBumountall\fR causes all mounted file systems in the current zone except
\fBroot\fR, \fB/usr\fR, \fB/var\fR, \fB/var/adm\fR, \fB/var/run\fR,
\fB/proc\fR, and \fB/dev/fd\fR to be unmounted. If the \fIFSType\fR is
specified, \fBmountall\fR and \fBumountall\fR limit their actions to the
\fIFSType\fR specified. There is no guarantee that \fBumountall\fR unmounts
\fIbusy\fR file systems, even if the \fB-k\fR option is specified.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.RS 11n
Specify the \fIFSType\fR of the file system to be mounted or unmounted.
.RE

.sp
.ne 2
.na
\fB\fB-h\fR \fIhost\fR\fR
.ad
.RS 11n
Unmount all file systems listed in \fB/etc/mnttab\fR that are remote-mounted
from host.
.RE

.sp
.ne 2
.na
\fB\fB-k\fR\fR
.ad
.RS 11n
Use the \fBfuser\fR \fB-k\fR \fImount-point\fR command. See the \fBfuser\fR(8)
for details. The \fB-k\fR option sends the \fBSIGKILL\fR signal to each process
using the file. As this option spawns kills for each process, the kill messages
might not show up immediately. There is no guarantee that \fBumountall\fR
unmounts \fIbusy\fR file systems, even if the \fB-k\fR option is specified.
.RE

.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.RS 11n
Limit the action to local file systems.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 11n
List the actions that would be performed for the specified options, but do not
actually execute these actions. Repeating the command without the \fB-n\fR
option executes the listed actions, assuming that the \fB/etc/mnttab\fR file
has not changed in the interval prior to repeating the command.
.RE

.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.RS 11n
Limit the action to remote file system types.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 11n
Do not perform the \fBumount\fR operation in parallel.
.RE

.sp
.ne 2
.na
\fB\fB-Z\fR\fR
.ad
.RS 11n
Apply the action(s) only to the file systems  mounted in non-global zones. By
default, \fBumountall\fR unmounts only file systems mounted in the current
zone. Option \fB-Z\fR is ignored if used in a non-global zone.
.RE

.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/mnttab\fR\fR
.ad
.sp .6
.RS 4n
Mounted file system table
.RE

.sp
.ne 2
.na
\fB\fB/etc/vfstab\fR\fR
.ad
.sp .6
.RS 4n
Table of file system defaults
.RE

.sp
.ne 2
.na
\fB\fB/usr/lib/fs/\fIFSType\fR/fsckall\fR\fR
.ad
.sp .6
.RS 4n
Script called by \fBmountall\fR to perform the file system check of all file
systems of type \fIFSType\fR
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
_
Output Stability	Uncommitted
.TE

.SH SEE ALSO
.sp
.LP
.BR mnttab (5),
.BR vfstab (5),
.BR attributes (7),
.BR fsck (8),
.BR fuser (8),
.BR mount (8)
.SH DIAGNOSTICS
.sp
.LP
No messages are printed if the file systems are mountable and clean.
.sp
.LP
Error and warning messages come from \fBfsck\fR(8) and \fBmount\fR(8).
.SH NOTES
.sp
.LP
At this time, NFS is the only remote file system supported by the \fB-l\fR,
\fB-r\fR, and \fB-h\fR options.
